<?php error_reporting(0);
session_start(); 
if (isset($_SESSION['connect'])) {
?>
<?php
header('Location: admin.php');
include 'config.php';
mysql_query("DELETE FROM $tablename");
mysql_query("ALTER TABLE $tablename AUTO_INCREMENT=0")
?>
<?php
}
else
{
header('Location: login.php');
}
?>

